package com.panshi.api;

import com.panshi.vo.qa.DataResultQA;
import com.panshi.vo.qa.Pages;
import com.panshi.vo.qa.ReplyAudit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "qa-server",contextId = "reply-audit-api")
public interface IReplyAuditApi {
    /*IReplyAuditApi(回答审核Api)*/

    /**
     * 添加回答
     * @param replyAudit
     * @return
     */
    @PostMapping("/replyAudit/add")
    @ResponseBody
    DataResultQA addReplyAudit(@RequestBody ReplyAudit replyAudit);

    /**
     * 分页查询
     * @param pages
     * @return
     */
    @PostMapping("/replyAudit/inquirePages")
    @ResponseBody
    DataResultQA<Pages<ReplyAudit>> inquireReplyAuditPages(@RequestBody Pages pages);

    /**
     * 查询总记录数
     * @param pages
     * @return
     */
    @GetMapping("/replyAudit/inquireSum")
    @ResponseBody
    DataResultQA<Integer> inquireReplyAuditSum(@RequestParam Pages pages);

    /**
     * 通过id查询回答
     * @param id
     * @return
     */
    @PostMapping("/replyAudit/inquireById/{id}")
    @ResponseBody
    DataResultQA<ReplyAudit> inquireByIdReplyAudit(@PathVariable int id);

    /**
     * 修改内容（用户）
     * @param replyAudit
     * @return
     */
    @PostMapping("/replyAudit/update")
    @ResponseBody
    DataResultQA updateReplyAudit(@RequestBody ReplyAudit replyAudit);

    /**
     * 删除(标记删除)
     * @param id
     * @return
     */
    @GetMapping("/replyAudit/delete/{id}")
    @ResponseBody
    DataResultQA deleteReplyAudit(@PathVariable int id);

    /**
     * 修改审核状态<审核>（管理员）
     * @param replyAudit
     * @return
     */
    @GetMapping("/replyAudit/updateState")
    @ResponseBody
    DataResultQA updateStateReplyAudit(@RequestParam ReplyAudit replyAudit);
}
